package database

import (
	"log"
	"server/global"
	"server/utils/database/mssql"
	"server/utils/database/mysql"
	"server/utils/database/sqliet"
)

func InitDB() {
	switch global.GL_CONFIG.Sql.Type {
	case "mysql":
		global.GL_DB, _ = mysql.InitDB()
	case "mssql":
		global.GL_DB, _ = mssql.InitDB()
	case "sqliet":
		global.GL_DB, _ = sqliet.InitDB()
	default:
		log.Panicln(global.GL_CONFIG.Sql.Type, "这个据库类型还没有哪")
	}

}
